<?php

use Phinx\Migration\AbstractMigration;

class AddColumnTenantIdInInvoiceTable extends AbstractMigration
{
    public function up()
    {
        $this->table("invoice")
            ->addColumn("tenant_id", "integer", [
                "signed" => false,
                'null' => false,
                'default' => 0,
                'limit' => 10,
                'comment' => '发票所属租户id'
            ])->save();
    }

    public function down()
    {
        $this->table("invoice")
            ->removeColumn("tenant_id")
            ->save();
    }
}
